<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:WinRTCalendar"
    xmlns:controlsPrimitives="using:System.Windows.Controls.Primitives"
    xmlns:System="using:System" xmlns:controls="using:System.Windows.Controls">
    <!-- CalendarDayButton Style -->
    <FontFamily
        x:Key="FontF_Normal">Segoe UI</FontFamily>

    <x:Double
        x:Key="FontS_Small">21</x:Double>
        <Style
        TargetType="controlsPrimitives:CalendarDayButton">
        <Setter
            Property="FontFamily"
            Value="{StaticResource FontF_Normal}" />
        <Setter
            Property="FontSize"
            Value="{StaticResource FontS_Small}" />
        <Setter
            Property="HorizontalContentAlignment"
            Value="Center" />
        <Setter
            Property="VerticalContentAlignment"
            Value="Center" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="controlsPrimitives:CalendarDayButton">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        From="Normal"
                                        GeneratedDuration="0:0:1"
                                        To="MouseOver" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="Background"
                                            Storyboard.TargetProperty="Opacity"
                                            To=".3" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="Background"
                                            Storyboard.TargetProperty="Opacity"
                                            To=".3" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="Background"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0" />
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="Content"
                                            Storyboard.TargetProperty="Opacity"
                                            To=".35" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="SelectionStates">
                                <VisualState
                                    x:Name="Unselected" />
                                <VisualState
                                    x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="SelectedBackground"
                                            Storyboard.TargetProperty="Opacity"
                                            To=".75" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="CalendarButtonFocusStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        From="CalendarButtonUnfocused"
                                        GeneratedDuration="0:0:1"
                                        To="CalendarButtonFocused" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="CalendarButtonFocused">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames
                                            Storyboard.TargetName="FocusVisual"
                                            Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame
                                                KeyTime="0"
                                                Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="CalendarButtonUnfocused" />
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="ActiveStates">
                                <VisualState
                                    x:Name="Active" />
                                <VisualState
                                    x:Name="Inactive">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames
                                            Storyboard.TargetName="Content"
                                            Storyboard.TargetProperty="Opacity">
                                            <EasingDoubleKeyFrame
                                                KeyTime="0"
                                                Value="0.5" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="DayStates">
                                <VisualState
                                    x:Name="RegularDay" />
                                <VisualState
                                    x:Name="Today">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames
                                            Storyboard.TargetName="TodayBackground"
                                            Storyboard.TargetProperty="Opacity">
                                            <EasingDoubleKeyFrame
                                                KeyTime="0"
                                                Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="BlackoutDayStates">
                                <VisualState
                                    x:Name="NormalDay" />
                                <VisualState
                                    x:Name="BlackoutDay">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="BlackoutVisual"
                                            Storyboard.TargetProperty="Opacity"
                                            To=".2" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle
                            x:Name="TodayBackground"
                            Fill="{Binding ControlBrush, Source={StaticResource SystemBrushes}}"
                            Stroke="{Binding ControlLightBrush, Source={StaticResource SystemBrushes}}"
                            StrokeThickness="1"
                            Opacity="0"
                            RadiusX="1"
                            RadiusY="1" />
                        <Rectangle
                            x:Name="SelectedBackground"
                            RadiusX="1"
                            RadiusY="1"
                            Fill="{Binding ControlBrush, Source={StaticResource SystemBrushes}}"
                            Opacity="0" />
                        <Rectangle
                            x:Name="Background"
                            RadiusX="1"
                            RadiusY="1"
                            Fill="{Binding HighlightBrush, Source={StaticResource SystemBrushes}}"
                            Opacity="0" />
                        <ContentControl
                            x:Name="Content"
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            Foreground="{Binding ControlDarkDarkBrush, Source={StaticResource SystemBrushes}}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Margin="8,2,8,2"
                            IsTabStop="False" />
                        <Path
                            x:Name="BlackoutVisual"
                            Fill="{Binding ControlTextBrush, Source={StaticResource SystemBrushes}}"
                            Stretch="Fill"
                            HorizontalAlignment="Stretch"
                            Margin="3"
                            VerticalAlignment="Stretch"
                            Opacity="0"
                            RenderTransformOrigin="0.5,0.5"
                            Data="M8.1772461,11.029181 L10.433105,11.029181 L11.700684,12.801641 L12.973633,11.029181 L15.191895,11.029181 L12.844727,13.999395 L15.21875,17.060919 L12.962891,17.060919 L11.673828,15.256231 L10.352539,17.060919 L8.1396484,17.060919 L10.519043,14.042364 z" />
                        <Rectangle
                            x:Name="FocusVisual"
                            RadiusX="1"
                            RadiusY="1"
                            StrokeThickness="2"
                            Stroke="{Binding ActiveBorderBrush, Source={StaticResource SystemBrushes}}"
                            IsHitTestVisible="false"
                            Opacity="0" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- CalendarButton Style -->
    <Style
        TargetType="controlsPrimitives:CalendarButton">
        <Setter
            Property="FontFamily"
            Value="{StaticResource FontF_Normal}" />
        <Setter
            Property="FontSize"
            Value="{StaticResource FontS_Small}" />
        <Setter
            Property="HorizontalContentAlignment"
            Value="Center" />
        <Setter
            Property="VerticalContentAlignment"
            Value="Center" />
        <Setter
            Property="UseLayoutRounding"
            Value="False" />
        <Setter
            Property="MinWidth"
            Value="50.75" />
        <Setter
            Property="MinHeight"
            Value="48" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="controlsPrimitives:CalendarButton">
                    <Grid
                        UseLayoutRounding="False">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        From="Normal"
                                        GeneratedDuration="0:0:1"
                                        To="MouseOver" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="Background"
                                            Storyboard.TargetProperty="Opacity"
                                            To=".5" />
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="Content"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="Content_Active"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="Background"
                                            Storyboard.TargetProperty="Opacity"
                                            To=".5" />
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="Content_Active"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetName="Content"
                                            Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="SelectionStates">
                                <VisualState
                                    x:Name="Unselected" />
                                <VisualState
                                    x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            Storyboard.TargetName="SelectedBackground"
                                            Storyboard.TargetProperty="Opacity"
                                            To=".75" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="ActiveStates">
                                <VisualState
                                    x:Name="Active" />
                                <VisualState
                                    x:Name="Inactive">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames
                                            Storyboard.TargetName="Content"
                                            Storyboard.TargetProperty="Opacity">
                                            <EasingDoubleKeyFrame
                                                KeyTime="0"
                                                Value="0.5" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="CalendarButtonFocusStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition
                                        From="CalendarButtonUnfocused"
                                        GeneratedDuration="0:0:1"
                                        To="CalendarButtonFocused" />
                                </VisualStateGroup.Transitions>
                                <VisualState
                                    x:Name="CalendarButtonFocused">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames
                                            Storyboard.TargetName="FocusVisual"
                                            Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame
                                                KeyTime="0"
                                                Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="CalendarButtonUnfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle
                            x:Name="SelectedBackground"
                            RadiusX="1"
                            RadiusY="1"
                            Fill="{Binding ControlBrush, Source={StaticResource SystemBrushes}}"
                            Opacity="0" />
                        <Rectangle
                            x:Name="Background"
                            RadiusX="1"
                            RadiusY="1"
                            Fill="{Binding HighlightBrush, Source={StaticResource SystemBrushes}}"
                            Stroke="{Binding ControlDarkDarkBrush, Source={StaticResource SystemBrushes}}"
                            StrokeThickness="1"
                            Opacity="0" />
                        <ContentControl
                            x:Name="Content"
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            Foreground="{Binding ControlDarkDarkBrush, Source={StaticResource SystemBrushes}}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Margin="6,4,6,4"
                            IsTabStop="False" />
                        <ContentControl
                            x:Name="Content_Active"
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            Foreground="{Binding HighlightTextBrush, Source={StaticResource SystemBrushes}}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Margin="6,4,6,4"
                            IsTabStop="False"
                            Visibility="Collapsed" />
                        <Rectangle
                            x:Name="FocusVisual"
                            RadiusX="1"
                            RadiusY="1"
                            StrokeThickness="2"
                            Stroke="{Binding ActiveBorderBrush, Source={StaticResource SystemBrushes}}"
                            IsHitTestVisible="false"
                            Opacity="0" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- CalendarItem Style -->
    <Style
        TargetType="controlsPrimitives:CalendarItem">
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="controlsPrimitives:CalendarItem">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetProperty="Visibility"
                                            Storyboard.TargetName="DisabledVisual">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation
                                            Duration="0"
                                            To="0.55"
                                            Storyboard.TargetProperty="Opacity"
                                            Storyboard.TargetName="DisabledVisual" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border
                            Margin="0,2,0,2"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="2">
                            <Border>
                                <Grid>
                                    <Grid.Resources>
                                        <ControlTemplate
                                            x:Key="HeaderButtonTemplate"
                                            TargetType="Button">
                                            <Grid>
                                                <!-- TODO: Cursor="Hand"-->
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup
                                                        x:Name="CommonStates">
                                                        <VisualState
                                                            x:Name="Normal" />
                                                        <VisualState
                                                            x:Name="MouseOver">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames
                                                                    Storyboard.TargetName="Content"
                                                                    Storyboard.TargetProperty="Opacity">
                                                                    <EasingDoubleKeyFrame
                                                                        KeyTime="0"
                                                                        Value=".75" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState
                                                            x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimation
                                                                    Duration="0"
                                                                    Storyboard.TargetName="Content"
                                                                    Storyboard.TargetProperty="Opacity"
                                                                    To=".55" />
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState
                                                            x:Name="Pressed">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames
                                                                    Storyboard.TargetName="Content"
                                                                    Storyboard.TargetProperty="Opacity">
                                                                    <EasingDoubleKeyFrame
                                                                        KeyTime="0"
                                                                        Value=".75" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <ContentControl
                                                    x:Name="Content"
                                                    Content="{TemplateBinding Content}"
                                                    ContentTemplate="{TemplateBinding ContentTemplate}"
                                                    FontWeight="Bold"
                                                    Foreground="{Binding ControlDarkDarkBrush, Source={StaticResource SystemBrushes}}"
                                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                                    Margin="1,1,1,4"
                                                    IsTabStop="False" />
                                            </Grid>
                                        </ControlTemplate>
                                        <DataTemplate
                                            x:Name="DayTitleTemplate">
                                            <TextBlock
                                                Text="{Binding}"
                                                FontWeight="Bold"
                                                Foreground="{Binding ControlDarkDarkBrush, Source={StaticResource SystemBrushes}}"
                                                HorizontalAlignment="Center"
                                                VerticalAlignment="Center"
                                                Margin="0,7,0,5" />
                                        </DataTemplate>
                                        <ControlTemplate
                                            x:Key="PreviousButtonTemplate"
                                            TargetType="Button">
                                            <Grid>
                                                <!-- TODO: Cursor="Hand"-->
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup
                                                        x:Name="CommonStates">
                                                        <VisualState
                                                            x:Name="Normal" />
                                                        <VisualState
                                                            x:Name="MouseOver">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames
                                                                    Storyboard.TargetName="path"
                                                                    Storyboard.TargetProperty="Opacity">
                                                                    <EasingDoubleKeyFrame
                                                                        KeyTime="0"
                                                                        Value=".75" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState
                                                            x:Name="Disabled" />
                                                        <VisualState
                                                            x:Name="Pressed">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames
                                                                    Storyboard.TargetName="path"
                                                                    Storyboard.TargetProperty="Opacity">
                                                                    <EasingDoubleKeyFrame
                                                                        KeyTime="0"
                                                                        Value=".75" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <Rectangle
                                                    Fill="#01000000"
                                                    Stretch="Fill" />
                                                <Grid>
                                                    <Path
                                                        x:Name="path"
                                                        Fill="{Binding ControlDarkDarkBrush, Source={StaticResource SystemBrushes}}"
                                                        Height="10"
                                                        Width="6"
                                                        HorizontalAlignment="Left"
                                                        VerticalAlignment="Center"
                                                        Margin="14,-2,0,0"
                                                        Stretch="Fill"
                                                        Data="M288.75,232.25 L288.75,240.625 L283,236.625 z" />
                                                </Grid>
                                            </Grid>
                                        </ControlTemplate>
                                        <ControlTemplate
                                            x:Key="NextButtonTemplate"
                                            TargetType="Button">
                                            <Grid>
                                                <!-- TODO: Cursor="Hand"-->
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup
                                                        x:Name="CommonStates">
                                                        <VisualState
                                                            x:Name="Normal" />
                                                        <VisualState
                                                            x:Name="MouseOver">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames
                                                                    Storyboard.TargetName="path"
                                                                    Storyboard.TargetProperty="Opacity">
                                                                    <EasingDoubleKeyFrame
                                                                        KeyTime="0"
                                                                        Value=".75" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState
                                                            x:Name="Disabled" />
                                                        <VisualState
                                                            x:Name="Pressed">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames
                                                                    Storyboard.TargetName="path"
                                                                    Storyboard.TargetProperty="Opacity">
                                                                    <EasingDoubleKeyFrame
                                                                        KeyTime="0"
                                                                        Value=".75" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <Rectangle
                                                    Fill="#01000000"
                                                    Stretch="Fill" />
                                                <Grid>
                                                    <Path
                                                        x:Name="path"
                                                        Fill="{Binding ControlDarkDarkBrush, Source={StaticResource SystemBrushes}}"
                                                        Height="10"
                                                        Width="6"
                                                        HorizontalAlignment="Right"
                                                        VerticalAlignment="Center"
                                                        Margin="0,-2,14,0"
                                                        Stretch="Fill"
                                                        Data="M282.875,231.875 L282.875,240.375 L288.625,236 z" />
                                                </Grid>
                                            </Grid>
                                        </ControlTemplate>
                                    </Grid.Resources>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition
                                            Width="Auto" />
                                        <ColumnDefinition
                                            Width="Auto" />
                                        <ColumnDefinition
                                            Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition
                                            Height="Auto" />
                                        <RowDefinition
                                            Height="*" />
                                    </Grid.RowDefinitions>
                                    <Button
                                        x:Name="PreviousButton"
                                        Template="{StaticResource PreviousButtonTemplate}"
                                        Height="22"
                                        Width="30"
                                        HorizontalAlignment="Left"
                                        Visibility="Collapsed"
                                        VerticalAlignment="Center" />
                                    <Button
                                        x:Name="HeaderButton"
                                        Template="{StaticResource HeaderButtonTemplate}"
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        Grid.Column="1"
                                        Margin="0,5,0,3" />
                                    <Button
                                        x:Name="NextButton"
                                        Template="{StaticResource NextButtonTemplate}"
                                        Height="22"
                                        Width="30"
                                        HorizontalAlignment="Right"
                                        Visibility="Collapsed"
                                        Grid.Column="2"
                                        VerticalAlignment="Center" />
                                    <Grid
                                        x:Name="MonthView"
                                        Margin="8,-1,8,8"
                                        Visibility="Collapsed"
                                        Grid.ColumnSpan="3"
                                        Grid.Row="1">
                                        <Grid.RowDefinitions>
                                            <RowDefinition
                                                Height="Auto" />
                                            <RowDefinition
                                                Height="Auto" />
                                            <RowDefinition
                                                Height="Auto" />
                                            <RowDefinition
                                                Height="Auto" />
                                            <RowDefinition
                                                Height="Auto" />
                                            <RowDefinition
                                                Height="Auto" />
                                            <RowDefinition
                                                Height="Auto" />
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition
                                                Width="Auto" />
                                            <ColumnDefinition
                                                Width="Auto" />
                                            <ColumnDefinition
                                                Width="Auto" />
                                            <ColumnDefinition
                                                Width="Auto" />
                                            <ColumnDefinition
                                                Width="Auto" />
                                            <ColumnDefinition
                                                Width="Auto" />
                                            <ColumnDefinition
                                                Width="Auto" />
                                        </Grid.ColumnDefinitions>
                                    </Grid>
                                    <Grid
                                        x:Name="YearView"
                                        Margin="8,5,8,8"
                                        Visibility="Collapsed"
                                        Grid.ColumnSpan="3"
                                        Grid.Row="1">
                                        <Grid.RowDefinitions>
                                            <RowDefinition
                                                Height="Auto" />
                                            <RowDefinition
                                                Height="Auto" />
                                            <RowDefinition
                                                Height="Auto" />
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition
                                                Width="Auto" />
                                            <ColumnDefinition
                                                Width="Auto" />
                                            <ColumnDefinition
                                                Width="Auto" />
                                            <ColumnDefinition
                                                Width="Auto" />
                                        </Grid.ColumnDefinitions>
                                    </Grid>
                                </Grid>
                            </Border>
                        </Border>
                        <Rectangle
                            x:Name="DisabledVisual"
                            Fill="{Binding WindowBrush, Source={StaticResource SystemBrushes}}"
                            Stroke="{Binding WindowBrush, Source={StaticResource SystemBrushes}}"
                            StrokeThickness="1"
                            Stretch="Fill"
                            Margin="0,2,0,2"
                            Visibility="Collapsed" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Calendar Style -->
    <Style
        TargetType="controls:Calendar">
        <Setter
            Property="FontFamily"
            Value="{StaticResource FontF_Bold}" />
        <Setter
            Property="FontSize"
            Value="{StaticResource FontS}" />
        <Setter
            Property="IsTabStop"
            Value="False" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="controls:Calendar">
                    <StackPanel
                        x:Name="Root"
                        HorizontalAlignment="Center">
                        <!--TODO: TextOptions.TextHintingMode="Fixed"-->
                        <controlsPrimitives:CalendarItem
                            x:Name="CalendarItem"
                            FontFamily="{TemplateBinding FontFamily}"
                            FontSize="{TemplateBinding FontSize}"
                            Background="{Binding CalendarGradient, Source={StaticResource SystemBrushes}}"
                            BorderBrush="{Binding ControlDarkBrush, Source={StaticResource SystemBrushes}}"
                            BorderThickness="1" />
                    </StackPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
